import Request from './request.js'


const API = {
	addCartShopping: '/app/bus/shopping/cart/add',
    queryCartList: '/app/bus/shopping/cart/list',
    deleteCart: '/app/bus/shopping/cart/remove',
    updateQuantity: '/app/bus/shopping/cart/setQuantity',
}

// 加入购物车
export const addCartShopping = params => Request.post(API.addCartShopping, {}, {data: params})
// 购物车列表
export const queryCartList = () => Request.get(API.queryCartList)
// 移除购物车
export const deleteCart = ids => Request.delete(`${API.deleteCart}/${ids}`)
// 设置购物车数量
export const updateQuantity = params => Request.put(API.updateQuantity, {}, {data: params})